package com.pinfly.common.http;

import java.util.HashMap;

/**
 * Interface that must be implemented by applications using HttpServer. When the
 * server gets a request, it invokes the application through the processRequest
 * method.
 * 
 * @see HttpServer
 */
public interface RequestProcessor
{
    /**
     * Method invoked when HttpServer gets a client request. When the HttpServer
     * gets a client request, it invokes the server application through this
     * method.
     * 
     * @param urlReference
     * @param parameters A <code>HashMap</code> containing the query parameters
     *            in the request. The key in the HashMap is the query item's
     *            name and the value in the HashMap is the query item's value.
     * @param clientConn A <code>ClientConnection</code> object containing
     *            information about the client connection, such as whether it
     *            uses SSL and the client's certificate, if available.
     */
    public String processRequest (String urlReference, HashMap parameters, ClientConnection clientConn);

}
